package com.chujian.framework.bean.msg;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.util.Map;

/**
 * @author ：chujian
 * @date ：2020-08-10
 * 短信消息
 */
@Getter
@Setter
@NoArgsConstructor
public class SmsMsg {

    // 短信模板
    private String smsTemplate;

    // 目标号码
    private String phoneNumber;

    // 消息参数
    private Map<String, Object> params;

    private Long toUserId;

    public SmsMsg(String smsTemplate, Long toUserId, String phoneNumber, Map<String, Object> params) {
        this.smsTemplate = smsTemplate;
        this.phoneNumber = phoneNumber;
        this.params = params;
        this.setToUserId(toUserId);
    }

    public String getMsgType() {
        return MsgConst.MSG_TYPE_SMS;
    }
}
